package com.woniuxy.microsportsserver.weightmag.mapper;

import com.woniuxy.microsportsserver.bean.WeightAnalysisInfo;
import com.woniuxy.microsportsserver.bean.WeightInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WeightMapper {
    //查询所有最近一次检测的数据 动态查询
    List<WeightInfo> findAll(@Param("w")WeightInfo weightInfo);
    //查询某个人的全部信息
    @Select("select * from user_weight_info where user_id = #{w.userId}")
    WeightInfo findOneByUserId(Long userId);
    //各年龄段平均体重
    List<WeightAnalysisInfo> findWeightByAgeType();
    //18岁以上的成年人体重分步
    List<WeightAnalysisInfo> WeightPercentage();
}
